
import traceback
from Bot import Bot

bot = None
def GetBot():
    '''
    Only call constructor if object doesn't exist yet to save time.
    '''
    global bot
    if bot is None:
        print('Starting Bot...')
        bot = Bot("Path of Exile")
    return bot

def BotRun():
    '''
    Run the bot
    '''
    b = GetBot()
    try:
        b.Start()
        b.Run()
    except:
        traceback.print_exc()
    b.Stop()

#Add in all cells after given cell
if __name__ == "__main__":
    BotRun()